package cc.minos.servers.openfire.managers
{
	import flash.events.NetStatusEvent;
	import flash.media.Camera;
	import flash.net.NetConnection;
	import flash.net.Responder;
	
	/**
	 * ...
	 * @author Minos
	 */
	public class Red5Manager extends BasicManager
	{
		private var rtmp:String = 'rtmp://localhost/oflaDemo';
		
		private var netConnection:NetConnection
		
		public function Red5Manager()
		{
			netConnection = new NetConnection();
			netConnection.client = this;
			netConnection.addEventListener( NetStatusEvent.NET_STATUS, onNetStatus );
			super( null );
		}
		
		private function onNetStatus( e:NetStatusEvent ):void
		{
			//var responder:Responder = new Responder();
			//netConnection.call( '' , responder );
			
			var cmr:Camera = Camera.getCamera()
			
			if ( cmr )
				trace( cmr.name );
			
		}
		
		public function connect():void
		{
			netConnection.connect( rtmp );
		}
	
	}

}